{{include file="header.html"}}
{{include file="menu.html"}}
<link rel="stylesheet" href="{{$smarty.const.__APP__}}style/message.css">
<div class="message">
    <div class="msg-form">
    	<form class="lForm" action="index.php?app=message&act=send" name="form" method="post">
        <input type="hidden" name="item" value="{{$smarty.get.item}}">
        <div class="item">
			<textarea maxlength="3000" style="" spellcheck="false" placeholder="留言内容，不超过3千个字" name='content' id='content'></textarea>
		</div>
        <div class="item">
            <input maxlength="11" class="txt-input txt-username" name="tel" type="text" value="{{$member.tel}}" placeholder="请输入手机号" autofocus required />
        </div>
        <div class="item">
            <input maxlength="50" class="txt-input txt-username" name="email" type="text" value="{{$member.email}}" placeholder="请输入邮箱" autofocus required  />
        </div>
        <div class="item item-captcha">
            <div class="input-info"  style="display:;">
                <input name="verify" class="txt-input txt-captcha" type="text" size="11" maxlength="6" autocomplete="off" placeholder="请输入验证码" />
                <span id="captcha-img"><img src="{{$smarty.const.__ROOT__}}index.php?app=functions&act=getVerifyCode" id="verifyCodeImg" onclick="this.src+='&' + Math.random();" alt="" width="63" height="25" /></span>
            </div>
        </div>
        </form>
        <div class="item item-btns">
            <a class="btn-login" href="javascript:;">发送</a>
        </div>
      
    </div>
</div>
</body>
<script>
$(function(){
		$('.btn-login').click(function(){
			var post_data = $(".lForm").serialize();
			$.post('{{"index.php?app=message&act=send"|URL}}',post_data,function(xml){
				if (xml.statusCode == '200'){
					ui.success("发送成功!");
		            document.location.href='{{"index.php?app=message"|URL}}';
				}else{
					ui.alert(xml.message);
					$('#verifyCodeImg').trigger('click');
				}
			},'json');
		});
});
</script>
</html>